/**
 * User: alesj
 * Date: 2005.6.3
 * Time: 10:34:52
 * 
 * (C) Genera Lynx d.o.o.
 */

package com.generalynx.common.web.tags;

import org.springframework.beans.factory.InitializingBean;

import java.util.HashMap;
import java.util.Map;

public class ADEBeanSelectListFactory implements InitializingBean {

    private Map selectRendererMap;

    public void afterPropertiesSet() throws Exception {
        if (selectRendererMap == null) {
            selectRendererMap = new HashMap();
        }
    }

    public SelectRenderer getSelectList(Class clazz) {
        return (SelectRenderer)selectRendererMap.get(clazz.getName());
    }

    public Map getSelectRendererMap() {
        return selectRendererMap;
    }

    public void setSelectRendererMap(Map selectRendererMap) {
        this.selectRendererMap = selectRendererMap;
    }
}
